package org.csu.controller;

import org.csu.entity.*;
import org.csu.service.BorrowRecordService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;
import org.csu.vo.BaseResponse;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;

@Controller(value="borrowRecordController")
public class BorrowRecordController {
    @Resource(name="borrowRecordService")
    private BorrowRecordService borrowRecordService;

    public String  getBorrowRecords(RecordQuery query, Integer pageNum){
        return borrowRecordService.getBorrowRecords(query, pageNum);
    }

    public ResponseEntity<Resource> exportBorrowRecords(RecordQuery query){
        return borrowRecordService.exportBorrowRecords(query);
    }

    public ResponseEntity<BaseResponse<BorrowStatistics>> getBorrowStatistics(){
        return borrowRecordService.getBorrowStatistics();
    }

}
